using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class AppParamDTO : INotifyPropertyChanged
    {
        private Int32 _AppParamId;
        private String _AppParamName;
        private String _AppParamValue;
        private int _No;

        [DataMember]
        public Int32 AppParamId
        {
            get { return _AppParamId; }
            set
            {
                _AppParamId = value;
                RaisePropertyChanged("AppParamId");
            }
        }

        [DataMember]
        public String AppParamName
        {
            get { return _AppParamName; }
            set
            {
                _AppParamName = value;
                RaisePropertyChanged("AppParamName");
            }
        }

        [DataMember]
        public String AppParamValue
        {
            get { return _AppParamValue; }
            set
            {
                _AppParamValue = value;
                RaisePropertyChanged("AppParamValue");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}